package com.xr.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import java.util.Date;

@Controller
public class DefaultController {
    @RequestMapping("gotoResult")
    public ModelAndView gotoResult(ModelAndView modelAndView){
        modelAndView.addObject("nowDate",new Date());
        modelAndView.setViewName("/WEB-INF/jsp/result.jsp");
        return modelAndView;
    }
}
